<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Jquery Inline Form Validation Engine</title>
		<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<script src="../jquery/js/jquery-1.6.min.js" type="text/javascript"></script>
	
		<!-- FRENCH LOCALISATION	
			<script src="js/jquery.validationEngine-fr.js" type="text/javascript"></script>  
		-->
			<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
			<script src="js/jquery.validationEngine.js" type="text/javascript"></script>
		
		<!-- AJAX AFTER SUCCESS TEST FONCTION	
			<script>function callSuccessFunction(){alert("success executed")}
					function callFailFunction(){alert("fail executed")}
			</script>
		-->
		<script>
		$(document).ready(function() {
			// SUCCESS AJAX CALL, replace "success: false," by:     success : function() { callSuccessFunction() }, 
			$("#formID").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "ajaxSubmit.php",
					ajaxSubmitMessage: "Thank you, we received your inscription!",
				success :  false,
				failure : function() {}
			})
			
			$("#formID2").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "ajaxSubmit.php",
					ajaxSubmitExtraData:"name=anything",
					ajaxSubmitMessage: "Thank you, we received your inscription from the second form!",
				success :  false,
				failure : function() {}
			})
			//$.validationEngine.buildPrompt("#date","This is an example","error")	 		 // Exterior prompt build example
			//$.validationEngine.closePrompt(".date") 										 // Exterior prompt close example
		});
		</script>
	</head>
	<body>
		<form id="formID" class="formular" method="post" action="">
			<fieldset>
				<legend>User informations</legend>
				<label>
					<span>Desired username (ajax validation, only karnius is available) : </span>
					<input value="karnius" class="validate[required,custom[noSpecialCaracters],length[0,20],ajax[ajaxUser]]" type="text" name="user" id="user" />
				</label>
				<label>
					<span>First name (ajax validation, only karnius is available): </span>
					<input value="karnius"  class="validate[custom[onlyLetter],length[0,100],ajax[ajaxName]] text-input" type="text" name="firstname" id="firstname" />
				</label>
				<label>
					<span>Last name : </span>
					<input value="karnius"  class="validate[custom[onlyLetter],length[0,100]] text-input" type="text" name="lastname" id="lastname" />
				</label>
				<label>
					<span>Email address : </span>
					<input value="ced@hotmail.com"  class="validate[required,custom[email]] text-input" type="text" name="email" id="email"  />
				</label>
<input class="submit" type="submit" value="Validate & Send the form!"/>
</fieldset>
</form>
<br /> <br /> <br />


<form id="formID2" class="formular" method="post" action="">
			<fieldset>
				<legend>User informations</legend>
				<label>
					<span>Desired username (ajax validation, only karnius is available) : </span>
					<input value="karnius" class="validate[required,custom[noSpecialCaracters],length[0,20],ajax[ajaxUser]]" type="text" name="user2" id="user2" />
				</label>
				<label>
					<span>First name (ajax validation, only karnius is available): </span>
					<input value="karnius"  class="validate[custom[onlyLetter],length[0,100],ajax[ajaxName]] text-input" type="text" name="firstname2" id="firstname2" />
				</label>
				<label>
					<span>Last name : </span>
					<input value="karnius"  class="validate[custom[onlyLetter],length[0,100]] text-input" type="text" name="lastname2" id="lastname2" />
				</label>

				<label>
					<span>Email address : </span>
					<input value="ced@hotmail.com"  class="validate[required,custom[email]] text-input" type="text" name="email2" id="email2"  />
				</label>
<input class="submit" type="submit" value="Validate & Send the form!"/>
</fieldset>
</form>
	</body>
</html>